package com.sw.study.presisence.executor;

import com.sw.study.presisence.pojo.Configuration;
import com.sw.study.presisence.pojo.MappedStatement;

import java.util.List;

/**
 * Created by sw on 2020/3/25.
 */
public interface Executor {
    /**
     * 查询
     * @param configuration
     * @param mappedStatement
     * @param params
     * @param <E>
     * @return
     * @throws Exception
     */
    public <E> List<E> query(Configuration configuration, MappedStatement mappedStatement, Object... params) throws Exception;

    /**
     * insert update delete
     * @param configuration
     * @param mappedStatement
     * @param params
     * @return
     * @throws Exception
     */
    public int execute(Configuration configuration, MappedStatement mappedStatement, Object... params) throws Exception;


}
